using Microsoft.AspNetCore.Http;

namespace OrderingSystem.Core.Interfaces
{
    public interface IFileService
    {
        /// <summary>
        /// 上传文件
        /// </summary>
        /// <param name="file">文件</param>
        /// <param name="subDirectory">子目录</param>
        /// <returns>文件相对路径</returns>
        Task<string> UploadFileAsync(IFormFile file, string subDirectory = "");

        /// <summary>
        /// 删除文件
        /// </summary>
        /// <param name="filePath">文件相对路径</param>
        /// <returns>是否删除成功</returns>
        Task<bool> DeleteFileAsync(string filePath);
    }
} 